package com.example.backend.controller;

import com.example.backend.common.ResultMessage;
import com.example.backend.service.IYHViewService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/yhview")
public class YHViewController {

    @Resource
    private IYHViewService yhViewService;

    @GetMapping("/{keyword}/{limit}")
    public ResultMessage queryYHViewList(@PathVariable("keyword") String keyword,@PathVariable("limit") Integer limit) {
        System.err.println(keyword);
        return ResultMessage.success(yhViewService.queryYHViewList(keyword,limit),"查询成功");
    }
}
